package com.mb.demo.entity;/*
 @author mabin
 @DESCRIPTION 
 @create 2023-5-19
*/

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
//表示表名
@TableName("user")
public class User {

    //表示字段名
    @TableField(value = "id")
    private String id;

    @TableField(value = "name")
    private String name;

    @TableField(value = "age")
    private String age;

    @TableField(value = "phone")
    private String phone;

    @TableField(value = "bir")
    @JSONField(format="yyyy/MM/dd HH:mm:ss")
    private Date bir;
}
